<?php

namespace App\Modules\Ws\Controller;

use Swoole\WebSocket\Frame;

class WebSocketController extends BasicController
{
    /**
     * @param $server
     * @param Frame $frame
     * @param array $data
     * @return void
     */
    public function onReceiveMsg($server, Frame $frame, array $data): void
    {
        $server->push($frame->fd, json_encode([
            'config' => $frame->fd
        ]));
    }
}